/*
 * Copyright (c) 2012 Tomas Shestakov. <http://code.google.com/p/jmmo/>
 */

package jmmo.engine.property

/**
 * Observable which contains an observable value and can has listeners.
 * It's rare used. Really useful its inheritor [[jmmo.engine.property.Property]]
 * <p>
 * The Observer is the class of changes which can be observed.
 * </p>
 * @tparam A type of `ObservableValue` value
 * @author Tomas Shestakov
 */
trait ObservableValue[+A] extends Observable with SilentObservableValue[A] {

  /**
   * Returns `SilentObservableValue` with same id, attributes and value.
   * @param filter a predicate which gets `Observable` and returns true if `Observable` pass the filter false otherwise.
   * @return `SilentObservable` with same content as this (Serializable and immutable recommended).
   */
  def serializedCopy(filter: Identifiable.Filter = Identifiable.passAll): SerializedObservableValue[A]
}
